package com.gilight.base.uiapp.coupon;



import com.gilight.base.base.exception.AppServiceException;
import com.gilight.base.base.exception.ServiceException;
import com.gilight.base.dto.CouponDTO;
import com.gilight.base.dto.CouponUserDTO;

import java.util.List;

/**
 * 优惠卷服务
 * Created by rize on 2019/7/4.
 */
public interface CouponService {

    /**
     *
     * @param couponId  优惠卷ID
     * @param userId    用户ID
     * @return
     * @throws ServiceException
     */
    public String obtainCoupon(
            Long couponId,
            Long userId) throws AppServiceException;
    /**
     * 获取用户可领取优惠券
     *
     * @param userId 用户Id
     * @param type
     * @return
     * @throws ServiceException
     */
    public List<CouponDTO> getObtainableCouponByPlatform(Long brandId,
                                                         Long userId, Integer type,Long zzjgId) ;

    /**
     * 获取用户可领取优惠券
     * @param userId 用户Id
     * @return
     * @throws ServiceException
     */
    public List<CouponDTO> getObtainableCoupon(
            Long userId) throws ServiceException;

    /**
     * 获取用户优惠卷
     * @param userId 用户Id
     * @param status
     * @param zzjgId
     * @return
     * @throws ServiceException
     */
    public List<CouponUserDTO> getUserCoupons(
            Long userId, Integer status, Long zzjgId) throws ServiceException;
    public List<CouponUserDTO> getAllUserCoupons(Long userId, Integer status) throws ServiceException;
    /**
     * 获取会员可领取优惠卷
     * @return
     * @throws ServiceException
     */
    public List<CouponDTO> getVipCoupons() throws ServiceException;
    public List<CouponDTO> getObtainableCouponByShopUser(Long brandId, Long zzjgId,Long userId);
    Boolean bookOldUserAndNewUser(Long oldUserId, Long newUserId);

    List<CouponDTO> getObtainableCouponByShop(Long brandId, Long zzjgId);
}
